<template>
<!--  <view>-->
<!--    <uni-collapse ref="collapse" v-model="value">-->
<!--      <uni-collapse-item title="默认开启" >-->
<!--        <view>-->
<!--          <single-station v-for="(item2,index) in item.valuationInfos" :key="index" :item='item2' @resize='resize' />-->
<!--          <text class="text" style='display: none'>{{content}}</text>-->
<!--        </view>-->
<!--      </uni-collapse-item>-->
<!--    </uni-collapse>-->
<!--  </view>-->
  <uni-collapse  @change='changeStatus' v-model='value' ref="collapse">
    <uni-collapse-item>
      <template v-slot:title>
        <view class="chanshishuju">
          <view style="font-weight:bold;">站址编码：<text :selectable="true">{{item.siteId}}</text></view>
          <view style="font-weight:bold;">项目编码：<text :selectable="true">{{item.subPrjCode}}</text></view>
          <view style="font-weight:bold;">项目名称：<text :selectable="true">{{item.subPrjName}}</text></view>
        </view>
      </template>
      <span style='display: none'>{{content}}</span>
      <view class="list-body" style='height: auto'>
        <single-station
          v-for="(item2,index) in item.valuationInfos"
          :key="index"
          :item='item2'
          @change='change'
          @resize='resize'
          :page-type='pageType'
          :is-edit='isEdit'
          :is-new='isNew'
        />
      </view>
    </uni-collapse-item>
  </uni-collapse>
</template>
<script>
import singleStation from "@/inspur/inspectionAndValuation/components/singleStation.vue";

export default {
  name: "batch",
  components: {singleStation},
  props:['item','pageType', 'isEdit', 'isNew'],
  data(){
    return {
      isInit: false,
      value:[],
      list:[
        {},
        {},
        {},
        {},
      ],
      content: '折叠内容主体，可自定义内容及样式，点击按钮修改内容使高度发生变化。',
    }
  },
  methods:{
    resize(){
      this.content+='1'
      // #ifdef MP
      this.$nextTick(() => {
        this.$refs.collapse.resize()
      })
      // #endif
    },
    change(){
      this.$emit('change')
    },
    changeStatus(show){
      // if (show.length>0&&!this.isInit){
      //   this.isInit = true
      //   console.log('初始化')
      // }else{
      //   console.log('关闭')
      // }
      
    }
  }
}
</script>
<style scoped lang='scss'>

</style>